package com.yanqingshan.platform.module.auth.model.domain;

import cn.dev33.satoken.stp.SaTokenInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import java.util.List;

/**
 * 功能描述:系统登录成功后，返回用户信息和token
 *
 * @author yanqs
 * @since 2023-05-13
 */
@Data
@ApiModel(value = "用户Token和权限信息")
@ToString(callSuper = true)
public class UserTokenInfo {

    @ApiModelProperty(value = "Token信息")
    private SaTokenInfo token;

    @ApiModelProperty(value = "用户信息")
    private UserInfo userInfo;

    @ApiModel("用户信息")
    @Data
    public static class UserInfo {
        @ApiModelProperty(value = "用户id")
        private String userId;
        @ApiModelProperty(value = "昵称")
        private String userName;
        @ApiModelProperty(value = "控制台")
        private String dashboard;
        @ApiModelProperty(value = "角色名称")
        private List<String> role;
    }
}




